package org.sg20.utils;

public class Edge {
    private double weight; //权重
    private String destName;

    public Edge(String destName, double weight) {
        this.weight = weight;
        this.destName = destName;
    }

    public Edge() {
        this.weight = 0;
        this.destName = "";
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getDestName() {
        return destName;
    }

    public void setDestName(String destName) {
        this.destName = destName;
    }

    @Override
    public String toString() {
        return String.format("%s,%6f", this.destName, this.weight);
    }
}
